$def with (d)

$var title: $_("Your Privacy on Open Library")

<div id="contentHead">
    <div class="small sansserif grey account-settings-menu">
      <a href="$ctx.user.key">$ctx.user.displayname</a>
      &raquo;
      <a href="$homepath()/account">$_("Settings")</a>
      &raquo; Privacy
    </div>
    <h1>$_("Privacy Settings")</h1>
</div>

$def selected(value, value2):
    $if value == value2: checked="checked"

$ public_readlog = d.get('public_readlog', 'no')

<div id="contentBody">
    <form method="post" class="olform" action="" id="privacy">

        <div class="formElement">
            <h3 class="collapse">Would you like to make your <a href="/account/books">Reading Log</a> public?</h3>
        </div>
        <br/>
        <div class="formElement">
            <div class="input radio">
                <div class="sansserif larger">
                    <input type="radio" name="public_readlog" id="r0" value="yes" $selected(public_readlog, "yes")/>
                    <label for="u0">$_("Yes")</label>
                    <br/><br/>
                </div>
            </div>
            <div class="input radio">
                <div class="sansserif larger">
                    <input type="radio" name="public_readlog" id="r1" value="no" $selected(public_readlog, "no")/>
                    <label for="u1">$_("No")</label>
                    <br/><br/>
                </div>
            </div>
        </div>
        <div class="formElement bottom">
            <div class="input">
                <br/>
                <button type="submit" class="larger" name="save" title="$_('Save')">$_("Save")</button>
                &nbsp;
                <a href="javascript:history.go(-1);" class="smaller attn">$_('Cancel')</a>
            </div>
        </div>
    </form>
</div>
